﻿using Appliaction.Dto.Inv;
using Domain.Entitys.Inv;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Appliaction.IAppServices.Inv
{
    /// <summary>
    /// 其他出库单
    /// </summary>
    public interface IInv_othoutordServices
    {
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="searchKeyword"></param>
        /// <param name="othoutord_type"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<othoutordSelectDto> inv_othoutordAsync(
         string searchKeyword,
         string Othoutord_type,
         int currentPage,
         int pageSize);

        /// <summary>
        /// 查询总数
        /// </summary>
        /// <param name="searchKeyword"></param>
        /// <param name="othoutord_type"></param>
        /// <returns></returns>
        Task<int> inv_othoutordCount(string searchKeyword, string Othoutord_type);

        /// <summary>
        /// 根据其他出库单编号查询其他出库单详情信息
        /// </summary>
        /// <param name="Othwr_code"></param>
        /// <returns></returns>
        Task<List<Inv_othproddetails>> iInv_othproddetailslSelect(string Othoutord_code);


        /// <summary>
        /// 删除入库单       
        /// </summary>
        /// <param name="othwr_id"></param>
        /// <returns></returns>
        Task<int> Inv_othoutord_delete(int othoutord_id);

        /// <summary>
        /// 修改审核状态
        /// </summary>
        /// <param name="othwr_code"></param>
        /// <param name="Othwr_audit_by"></param>
        /// <param name="Othwr_audit_time"></param>
        /// <param name="othwr_audit_statua"></param>
        /// <param name="othwr_audit_opinion"></param>
        /// <returns></returns>
        Task<int> Inv_othoutord_examineUpdate(Inv_othoutord_examineUpdateDto inv_Othoutord);

        /// <summary>
        /// 根据编号查询其他出库单信息
        /// </summary>
        /// <param name="trf_code"></param>
        /// <returns></returns>
        Task<List<Inv_othoutord>> Inv_trf_SelectCode(string othoutord_code);


        /// <summary>
        /// 根据编码查询其他出库单的详情信息
        /// </summary>
        /// <param name="trf_code"></param>
        /// <returns></returns>
        Task<List<Inv_othproddetails>> Inv_trf_SelectDetail(string othoutord_code);


        /// <summary>
        /// 根据单据编号查询 其他出库单信息的id,来添加详情
        /// </summary>
        /// <param name="otgwr_code"></param>
        /// <returns></returns>
        Task<int> othproddetailsSelect_id(string otgwr_code);


        /// <summary>
        /// 添加其他出库单信息
        /// </summary>
        /// <param name="inv_Othoutord"></param>
        /// <returns></returns>
        Task<int> Inv_othoutordAdd(Inv_othoutordAddDto  inv_Othoutord);


        // <summary>
        /// 添加明细表的信息--其他出库单
        /// </summary>
        /// <param name="inv_Othwrproddtl"></param>
        /// <returns></returns>
        Task<int> Inv_othproddetails(List<Inv_othproddetailsAddDto> entities);


        /// <summary>
        /// 修改出库状态
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> Inv_othproddetails_updateType(int id);


        /// <summary>
        /// 修改出库单和同一时间修改出库库单详情信息库单
        /// </summary>
        /// <param name="inv_Othoutord"></param>
        /// <returns></returns>
        Task<int> Inv_othoutord_update(Inv_OthoutordUpdateMerage inv_OthoutordUpdateMerage);
    }
}
